Skip to content

Conversation

RalfJung
Copy link
Member

#128399 added these unsafe blocks and as far as I can tell that's entirely due to const-eval limitations.

r? @tgross35

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 20, 2025
@tgross35
Copy link
Contributor

That PR actually moved the implementations - it used to be that as_str and friends would call deref, which had the unsafe implementation. But #128399 flipped them so as_str has the implementation and deref calls that, the unsafe block isn't repeated. Is there a reason to flip them back when possible?

@RalfJung
Copy link
Member Author

You're right, I missed that this is just moved code, not new code.

@RalfJung RalfJung closed this Feb 21, 2025
@RalfJung RalfJung deleted the string-vec-const-hack branch February 21, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants